<?php
$data = FALSE;
if(isset($_POST['pokerSpecificId'])) {
    require_once '../Controllers/RegistrarController.php';
    $data = getData($_POST['pokerSpecificId']);
    if (!$data) {
        die("No se obtuvieron los datos para generar la vista");
    }
} else {
    die("No se recibieron los parámetros correspondientes");
}
?>

<script type="text/javascript" src="./Fuentes/js/RegistrarForm.js"></script>
<div class="modal fade" id="formularioDeRegistro" tabindex="-1" role="dialog" keyboard="true" 
     aria-labelledby="formularioDeRegistroLabel" aria-hidden="true" data-backdrop="static" >
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="col-md-12 text-left h1" style="font-size: 45px;">
                <?php echo "BIENVENID".(($data['genero'] === "FEMENINO")?"A":($data['genero'] === "SIN DEFINIR")?"@":"O");?><br>&nbsp;
            </div>
            
            <div class="col-md-12 h1 text-center" style="font-size: 50px; font-weight: bold;">
                <?php echo $data['apenom']; ?><br>&nbsp;
            </div>
            
            <div class="col-sm-12"> 
                <div class="col-sm-offset-1 col-sm-10 well bs">
                    <div class="col-sm-6 h1 text-center text-success">MESA</div>
                    <div class="col-sm-6 h1 text-center text-success">POSICIÓN</div>
                    <div class="col-sm-6 h1 text-center text-success" style="font-size: 70px; font-weight: bold;">
                        <?php echo $data['mesa']; ?>
                    </div>
                    <div class="col-sm-6 h1 text-center text-success" style="font-size: 70px; font-weight: bold;">
                        <?php echo $data['posicion']; ?>
                    </div>
                </div>
            </div>
            <h1><br>&nbsp;</h1>

            
            <div class="modal-footer " id="footer" >
                <div class="col-sm-6">
                    <div id="progressTimer"></div>
                    <div id="formMensaje" class="text-left text-warning"></div>
                </div>
                <div class="col-sm-6">
                    <form role="form" id="formRegistrar" autocomplete="off" >
                        <input type="hidden" id="pokerSpecificId" name="pokerSpecificId" value="<?php echo $data['id']; ?>" >
                        <button type="button" class="btn btn-default btn-lg" id="cancelar" data-dismiss="modal">Cancelar</button>
                        <button type="submit" class="btn btn-primary btn-lg" id="aceptar" style="width: 120px;">Aceptar</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type='text/javascript'> $('#formularioDeRegistro').modal('show');</script>